package cn.javaxc.mvcwork.controller.web;
import java.util.Map;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.controller.MVCConfig;

public class TreeBean {
	//tree_clmn
	private String treeNodeId,treeNodePid,treeNodeName,treeNodeUrl,formOperation;
	//table
	private String treeFields, treeTable, treeFrom, treeWhere, treeOrderby,tableNodeUrl;



	private String pid = null;
	private String permission;
	private String linkName;
	private String treeNodeIcon="icon",treeFolderIcon="folder_icon";
	private String existsField;
	private String prefix="";
	private String outlineNum="-1";
	private Map parasMap;
	private FileTreeBean fileBean=new FileTreeBean();
//	public int iResult=0;
	public TreeBean(){
//		iResult=CommonUtil.parseInt(MVCConfig.getConfig().getClassProperty(this.getClass(),"iResult"),iResult);
	}
	public String getTreeFields() {
		return treeFields;
	}

	public void addTreeFields(String a_fields) {
		if (this.treeFields != null && !this.treeFields.equals(""))
			this.treeFields = this.treeFields + "," + a_fields;
		else
			this.treeFields = a_fields;
	}

	public void setTreeFields(String treeFields) {
		this.treeFields = treeFields;
	}

	public String getTreeFrom() {
		return treeFrom;
	}

	public void setTreeFrom(String treeFrom) {
		this.treeFrom = treeFrom;
	}

	public String getTreeNodeId() {
		return treeNodeId;
	}

	public void setTreeNodeId(String treeNodeId) {
		this.treeNodeId = treeNodeId;
	}

	public String getTreeNodeName() {
		return treeNodeName;
	}

	public void setTreeNodeName(String treeNodeName) {
		this.treeNodeName = treeNodeName;
	}

	public String getTreeNodePid() {
		return treeNodePid;
	}

	public void setTreeNodePid(String treeNodePid) {
		this.treeNodePid = treeNodePid;
		if(linkName==null)setLinkName(treeNodePid);
	}

	public String getTreeNodeUrl() {
		return treeNodeUrl;
	}

	public void setTreeNodeUrl(String treeNodeUrl) {
		this.treeNodeUrl = treeNodeUrl;
	}

	public String getTreeOrderby() {
		return treeOrderby;
	}

	public void setTreeOrderby(String treeOrderby) {
		this.treeOrderby = treeOrderby;
	}

	public String getTreeTable() {
		return treeTable;
	}

	public void setTreeTable(String treeTable) {
		this.treeTable = treeTable;
		if(treeFrom==null||treeFrom.equals(""))setTreeFrom(treeTable+" a ");
	}

	public String getTreeWhere() {
		return treeWhere;
	}

	public void setTreeWhere(String treeWhere) {
		this.treeWhere = treeWhere;
	}

	public String getFormOperation() {
		return formOperation;
	}

	public void setFormOperation(String formOperation) {
		this.formOperation = formOperation;
	}





	public String getPid() {
		return pid;
	}

	public void setPid(Object pid) {
		this.pid = pid+"";
	}
	public String getPermission(){
		return this.permission;
	}
	public void setPermission(String permission){
		this.permission=permission;
	}

	public String getLinkName(){
		return this.linkName;
	}
	public void setLinkName(String linkName){
		this.linkName=linkName;
	}
	public String getTreeNodeIcon(){
		return this.treeNodeIcon;
	}
	public void setTreeNodeIcon(String treeNodeIcon){
		this.treeNodeIcon=treeNodeIcon;
	}
	public String getTreeFolderIcon(){
		return this.treeFolderIcon;
	}
	public void setTreeFolderIcon(String treeFolderIcon){
		this.treeFolderIcon=treeFolderIcon;
	}
	public String getIcon(){
		return this.treeNodeIcon;
	}
	public String getTableNodeUrl(){
		return this.tableNodeUrl;
	}
	public void setTableNodeUrl(String tableNodeUrl){
		this.tableNodeUrl=tableNodeUrl;
	}
	public String getExistsField(){
		return this.existsField;
	}
	public void setExistsField(String existsField){
		this.existsField=existsField;
	}
	public String getPrefix(){
		return this.prefix;
	}
	public void setPrefix(String prefix){
		this.prefix=prefix;
	}
	public String getOutlineNum(){
		return this.outlineNum;
	}
	public void setOutlineNum(String tmp){
		this.outlineNum=tmp;
	}
	public Map getParasMap(){
		return this.parasMap;
	}
	public void setParasMap(Map parasMap){
		this.parasMap=parasMap;
	}
	public FileTreeBean getFileBean(){
		return this.fileBean;
	}
	public void setFileBean(FileTreeBean fileBean){
		this.fileBean=fileBean;
	}

}
